package com.xmtlxx.sacw.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xmtlxx.common.core.domain.PageQuery;
import com.xmtlxx.common.core.page.TableDataInfo;
import com.xmtlxx.sacw.domain.DisposalBankConfig;
import com.xmtlxx.sacw.mapper.DisposalBankConfigMapper;
import com.xmtlxx.sacw.service.IDisposalBankConfigService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 处置银行信息service业务实现
 *
 * @author hergreen
 * @date 2024/09/24 17:58
 **/
@Service
@RequiredArgsConstructor
public class DisposalBankConfigServiceImpl implements IDisposalBankConfigService {

    private final DisposalBankConfigMapper baseMapper;

    @Override
    public boolean insertOrUpdate(DisposalBankConfig config) {
       return baseMapper.insertOrUpdate(config);
    }

    @Override
    public List<DisposalBankConfig> getDisposalBankConfigList() {

        return baseMapper.selectList(new LambdaQueryWrapper<DisposalBankConfig>().eq(DisposalBankConfig::getDelFlag,0));
    }

    @Override
    public boolean delete(String id) {

        return baseMapper.updateById(new DisposalBankConfig(id))>0;
    }


}
